//
//  Command.h
//  Command
//
//  Created by Hechun on 2020/11/7.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol CommandDelegate <NSObject>

@optional
- (void)commandAciton;

@end

@class Command;
typedef void(^CommandCompletionCallBack)(Command *cmd);

@interface Command : NSObject

@property (nonatomic, copy, nullable) CommandCompletionCallBack completion;

- (void)execute;
- (void)cancel;

- (void)done;

@end

NS_ASSUME_NONNULL_END
